<template>
  <div id="screen">
    <div class="title-box">大屏</div>
    <div class="middle-content">
      <div class="middle-left">
        <div class="box-item">
          <LineChart />
        </div>
        <div class="box-item"></div>
      </div>
      <div class="middle-center">
        <div class="img-box-item"></div>
      </div>
      <div class="middle-right">
        <div class="box-item"></div>
        <div class="box-item"></div>
      </div>
    </div>
    <div class="bottom-content">
      <div class="box-item"></div>
      <div class="box-item"></div>
      <div class="box-item"></div>
      <div class="box-item"></div>
      <div class="box-item"></div>
    </div>
  </div>
</template>

<script setup lang="ts">
  // 数据大屏自适应函数
  import { onMounted } from 'vue';
  import LineChart from '@/views/screen/charts/LineChart.vue';
  import autofit from 'autofit.js';

  onMounted(() => {
    autofit.init({
      designHeight: 1080,
      designWidth: 1920,
      renderDom: '#screen',
      resize: true,
    });
  });
</script>

<style scoped lang="less">
  #screen {
    width: 100%;
    height: 100%;
    color: white;
    font-size: 16px;
    background: #0a1541;
    .title-box {
      width: 100%;
      height: 80px;
      font-size: 26px;
      font-weight: bold;
      text-align: center;
      line-height: 80px;
      border-bottom: 1px solid white;
    }
    .middle-content {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 10px;
      box-sizing: border-box;
      .middle-left,
      .middle-right {
        width: 19%;
        .box-item {
          height: 300px;
          border: 1px solid white;
          margin-top: 20px;
        }
      }
      .middle-center {
        width: 59.5%;
        .img-box-item {
          width: 100%;
          height: 630px;
          border: 1px solid white;
          margin-top: 20px;
        }
      }
    }
    .bottom-content {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 10px;
      box-sizing: border-box;
      .box-item {
        width: 19%;
        height: 300px;
        border: 1px solid white;
        margin-top: 20px;
      }
    }
  }
</style>
